<template>
	<view style="padding: 30rpx;">
		<navigator url="/pages/APIpages/LogPage/LogPage">
			<button>打印日志</button>
		</navigator>
		<!-- uni.navigateTo -->
		<navigator url="/pages/APIpages/Timepage/Timepage" open-type="switchTab">
			<button>计时器</button>
		</navigator>
		<button @click="goStoPage()">数据缓存</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		onLoad() {
			uni.preloadPage({
				url:"/pages/APIpages/storagePage/storagePage"
			})
		},
		methods: {
			goStoPage() {
				uni.navigateTo({
					url:"/pages/APIpages/storagePage/storagePage",
					success() {
						console.log("navigateTo--->success");
					},
					fail(e) {
						console.log("navigateTo--->fail: " + JSON.stringify(e));
					},
					complete() {
						console.log("navigateTo--->complete");
					}
				})
				
				// uni.redirectTo({
				// 	url:"/pages/APIpages/StoragePage/StoragePage"
				// })
				// uni.switchTab({
				// 	url:"/pages/tabBar/tabcompage/tabcompage"
				// })
			}
		}
	}
</script>

<style>
	button {
		margin: 20rpx;
	}
</style>